package com.java.ch022;

enum Season{
    a,b,c,d
}
class demo{
    Season se;
    public demo(Season s){
        this.se = s;
    }
    public void saySeason(){
        switch (se){
            case a:System.out.println("a");break;
            case b:System.out.println("b");break;
            case c:System.out.println("c");break;
            case d:System.out.println("d");break;
        }
    }
}
// 主函数
public class h {
    public static void main(String[] args){
        demo spring = new demo(Season.a);
        spring.saySeason();
        demo summer = new demo(Season.b);
        summer.saySeason();
        demo fall = new demo(Season.c);
        fall.saySeason();
        demo winter = new demo(Season.d);
        winter.saySeason();
    }
}